<cfcomponent displayname="Application" output="true" hint="Handle the application.">
	
	<!--- Set up the application. --->
	<cfset THIS.Name = "gestionProjets">
	<cfset THIS.SessionManagement = true>

	<cffunction name="onApplicationStart">
		<cfset application.bIsProd = 0>
		<cfset application.sNomDSN = "DSN_PROJETS">
		<cfset application.sNomServeur = CGI.SERVER_NAME>
	</cffunction>
	
	
	<cffunction name="onSessionStart">
	
	</cffunction>


	<cffunction name="onRequestStart">
		
		<cfif isdefined("bRenitAppli")>
			<cfset onApplicationStart()>
		</cfif>
		
		<cfif isdefined("logout")>
			<cfset structdelete(session,'stLogin')>
			<cfcookie name="gestionProjets" expires="now">
		</cfif>

		<cfif NOT IsDefined("session.stLogin")>
			<cfinclude template="loginform.cfm">
			<cfabort>
		</cfif>
		
	</cffunction>
	
	
</cfcomponent>